package au.com.iglootech.winerymap.servlet;

import java.io.BufferedWriter;
import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;

import com.vaadin.Application;
import com.vaadin.terminal.gwt.server.GAEApplicationServlet;
import com.vaadin.ui.Window;

/**
 * 
 * @author nicholas zhu
 * 
 */
public class WineryMapApplicationServlet extends GAEApplicationServlet {

	/**
	 * 
	 */
	private static final long serialVersionUID = -3763045442534462887L;

	@Override
	protected void writeAjaxPageHtmlVaadinScripts(final Window window,
			final String themeName, final Application application,
			final BufferedWriter page, final String appUrl,
			final String themeUri, final String appId,
			final HttpServletRequest request) throws ServletException,
			IOException {
		page.write("<script type=\"text/javascript\">\n");
		page.write("//<![CDATA[\n");
		page.write("document.write(\"<script language='javascript' src='./jquery/jquery-1.4.4.min.js'><\\/script>\");\n");
		page.write("document.write(\"<script language='javascript' src='./js/highcharts.js'><\\/script>\");\n");
		page.write("document.write(\"<script language='javascript' src='./js/modules/exporting.js'><\\/script>\");\n");
		page.write("//]]>\n</script>\n");
		super.writeAjaxPageHtmlVaadinScripts(window, themeName, application,
				page, appUrl, themeUri, appId, request);
	}

}
